home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Brotikasten
/
BROTCD01.iso
/
lern
/
lern338.d64
/
py006 multimic
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
1995-08-09
|
6KB
|
255 lines
1 PRINT"[147]
2 [153]"DO YOU WISH TO DO :
3 PRINT"1. MULTIMETER
4 [153]"2. MICROMETER SCREW GAUGE
5 GETA:IFA>2ORA<1THEN5
6 ONAGOTO10,3500
10 PRINT"[147] MULTIMETER
20 [153]"STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$
30 PRINT:PRINT:PRINT
40 GOSUB2000
50 PRINT" THIS IS THE SCALE OF A MULTIMETER
55 [153]" WHICH CAN BE USED ON THE FOLLOWING
60 PRINT" RANGES :-
65 [153][163]10)"(1) 1000 VOLT
70 PRINTTAB(10)"(2) 250 VOLT
75 [153][163]10)"(3) 50 VOLT
80 PRINTTAB(10)"(4) 10 VOLT
85 [153][163]10)"(5) 500 MILLIAMP
90 PRINTTAB(10)"(6) 25 MILLIAMP
95 [153]" PRESS ANY KEY TO CONTINUE
100 GETA$: IFA$=""THEN100
110 PRINT"[147]":GOSUB2000
115 PRINT"TEN RANDOM READINGS WILL APPEAR FOR
117 [153]"A MAXIMUM OF 10 SECONDS.
119 PRINT"WRITE DOWN EACH READING AS QUICKLY AS
121 [153]"POSSIBLE. MARKS WILL BE AWARDED FOR
123 PRINT"SPEED AND ACCURACY.
125 [153]"YOU WILL BE ASKED TO TYPE IN YOUR
127 PRINT"RESULTS AT THE END OF THE TEST FOR
129 [153]"SCORING.
130 GOSUB5000
131 PRINT" PRESS ANY KEY TO CONTINUE
138 [129]I[178]1[164]10
300 S[178][181](6[172][187](1)[170]1)
310 RI[178][181](50[172][187](1)[170]1)
311 [139]RI[179][178]24[167]P(I)[178]0:[137]315
313 R[178](RI[171]24.5):P(I)[178]10
314 [137]319
315 R[178]RI
319 B(I)[178]R
320 [139]S[178]1[167]S$(I)[178]"VOLT":H(I)[178]1000:Q(I)[178]40[172]R:[137]500
330 [139]S[178]2[167]S$(I)[178]"VOLT":H(I)[178]250:Q(I)[178]R[172]10:[137]500
340 [139]S[178]3[167]S$(I)[178]"VOLT":H(I)[178]50:Q(I)[178]R[172]2:[137]500
350 [139]S[178]4[167]S$(I)[178]"VOLT":H(I)[178]10:Q(I)[178]R[173]2.5:[137]500
360 [139]S[178]5[167]S$(I)[178]"MA":H(I)[178]25:Q(I)[178]R:[137]500
370 [139]S[178]6[167]S$(I)[178]"MA":H(I)[178]500:Q(I)[178](R[172]20):[137]500
500 [153]"LOADPROBLEM ";I
505 [153]"METER SET ON ";H(I);" ";S$(I);" RANGE
510 PRINT"":GOSUB2000
520 GOSUB1500
521 PRINT" PRESS Z WHEN READY
522 T3[178]TI
523 [161]A$:[139]A$[178]"Z"[167]525
524 [139]TI[171]T3[179]600[167][137]523
525 D(I)[178]TI[171]T3
540 [130]I
600 [137]2500
1500 [151]33332,66
1505 [129]J[178]1[164](R[170]5)
1510 T2[178]TI
1520 [139]TI[171]T2[179](J[173]2)[167]1520
1530 [151](33331[170]J),32
1535 [139]J[177]25[167]1560
1540 [151](33332[170]J),66
1550 [130]J
1555 [151](33331[170]J),32
1560 [129]K[178]9[164]1[169][171]1
1562 [139](R[170]K)[177]25[167]1590
1565 T2[178]TI
1567 [139]TI[171]T2[179](4[172](10[171]K))[167]1567
1570 [151](33328[170]R[170]K),32
1580 [151](33327[170]R[170]K),66
1590 [130]K
1600 [129]L[178]1[164]4
1610 T2[178]TI
1620 [139]TI[171]T2[179](L[172]10)[167]1620
1630 [151](33327[170]R[170]L),32
1640 [151](33328[170]R[170]L),66
1645 [139]P(I)[178]10[167][151](33328[170]R[170]L),103
1650 [130]L
1700 [142]
2000 [153]" 0 50 100 150 200 250
2005 PRINT" 0 10 20 30 40 50
2010 [153]" 0 2 4 6 8 10
2015 PRINT" [194] [194] [194] [194] [194] [194]
2020 [153]" PEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEKPEEK
2025 RETURN
2500 PRINT"[147]MARKING
2510 [153]"STR$STR$STR$STR$STR$STR$STR$
2520 PRINT" TYPE IN YOUR SOLUTION, INCLUDING
2530 [153]"THE UNIT ABBREVIATED AS 'MA' OR 'VOLT' AND PRESS 'RETURN'
2532 PRINT" PRESS ANY KEY TO CONTINUE
2534 [161]A$:[139]A$[178]""[167]2534
2540 E[178]0:N[178]0
2550 [129]I[178]1[164]10
2560 [153]"LOAD PROBLEM NO. ";I;".
2570 PRINT"YOUR ANSWER -";
2580 INPUTW$
2590 IFVAL(W$)=Q(I)ANDRIGHT$(W$,2)=RIGHT$(S$(I),2)THEN2700
2600 PRINT"[147]"
2620 PRINT"THE READING ON THE ";H(I);S$(I);" SCALE
2621 [153]"WAS ";Q(I);" ";S$(I)
2622 [153]:[153]:[153]:[153]
2624 [141]2000
2625 [139]P(I)[179]5[167][151](33372[170]B(I)),66:[137]2640
2630 [151](33372[170]B(I)),103
2640 [153]" PRESS ANY KEY TO CONTINUE
2650 GETA$:IFA$=""THEN2650
2660 GOTO2740
2700 PRINT"THAT IS CORRECT."
2710 T4=TI
2720 IFTI-T4<120THEN2720
2730 E=E+D(I):N=N+1
2740 NEXTI
3000 PRINT"[147]YOU GOT ";N;" READINGS CORRECT OUT OF TEN.
3010 [153]"TAKING SPEED INTO CONSIDERATION THIS
3020 PRINT"MEANS YOUR RATING IS ";INT(10-E/1200)*N;" %
3040 [153]" PRESS ANY KEY TO CONTINUE
3050 GETA$:IFA$=""THEN3050
3060 PRINT"[147]DO YOU WISH -
3070 [153]"1.TO DO ANOTHER TEST ?
3080 PRINT"2.TO DO ANOTHER PROGRAMME ?
3090 [161]W:[139]W[177]2[176]W[179]1[167]3090
3100 [145]W[137]10,1
3500 [153]"LOAD":I[178]0:PM[178]101:[141]4000
3530 [151]33305,100:[151]33106,48:[151]33306,52:[151]32905,100:[151]33105,100
3540 [151]32906,53:[151]33307,53
3600 [153]"THIS REPRESENTS THE STEM AND THIMBLE
3602 PRINT"OF A PROPERLY ZEROED HALF MILLIMETRE PITCH MICROMETER SCREW GAUGE.
3610 [141]5000
3620 [153]"LOAD":I[178]7:[141]4000
3630 [151](33305[170]I),100:[151](23106[170]I),48:[151](33306[170]I),52:[151](32905[170]I),100
3640 [151](32906[170]I),53:[151](33307[170]I),53:[151](33105[170]I),100
3654 [153]"THIS REPRESENTS THE MICROMETER WHEN
3656 PRINT"THE GAP BETWEEN THE ANVIL AND THE
3658 [153]"SPINDLE IS 3.50 MM.
3660 GOSUB5000
3670 GOSUB3700
3680 GOTO3880
3700 Z=(INT((10*RND(1))*100))/100
3701 I=INT(2*Z)
3702 X=INT(100*Z-(INT(Z/.5))*50+.05)
3703 IFX<10THENPM=101:GOTO3710
3704 IFX>=10THENPM=66
3705 IFX>=30THENPM=71
3706 IFX>=40THENPM=101
3708 I=I+1
3710 PRINT"[147]":GOSUB4000
3715 POKE(33184+I),76
3750 FORN=1TO11
3760 M=X+6-N
3770 IFM>=50THENM=M-50:GOTO3790
3780 IFM<0THENM=M+50
3790 IF(INT(M/10))*10=MTHENM2=INT(M/10):M3=1:GOTO3805
3800 IF(INT(M/5))*5=MTHENM2=INT(M/10):M3=2:GOTO3805
3802 GOTO3810
3805 GOSUB3820
3810 NEXTN
3815 RETURN
3820 POKE(32865+I+40*N),100
3825 IFM2=0GOTO3850
3830 PN=48+M2
3840 POKE(32866+I+40*N),PN
3850 PN=43+5*M3
3860 POKE(32867+I+40*N),PN
3870 RETURN
3880 PRINT"NOTE.....
3881 [153]"1. ON THE SPINDLE THE";([181](Z[173].5))[172].5;"IS VISIBLE (OR
3882 PRINT"ABOUT TO BE VISIBLE), WHILE THE";(INT(Z/.5))*.5+.5;"LINE
3883 [153]"CANNOT BE SEEN.
3885 PRINT"2. '";X;"' IS THE LINE ON THE THIMBLE
3886 [153]"OPPOSITE THE LINE ON THE SPINDLE.
3980 PRINT"THE READING IS ";Z;" MM[145][145]"
3988 GOSUB5000
3989 PRINT"[147]DO YOU WISH-
3990 [153]"1. ANOTHER EXAMPLE ?
3991 PRINT"2. A WEE TEST OF YOUR SKILL ?
3992 [153]"3. ANOTHER PROGRAMME ?
3993 GETA:IF A>3ORA<1THEN3993
3994 ONAGOTO3670,5200,1
3995 END
4000 PRINT"[162][162][162][162][162][162]
4010 [153]"SPC(SPC(SPC(SPC(SPC(SPC(TAB(TAB(TAB(TAB(TAB(TAB(TAB(
4020 PRINT"[166][166][166][166][166][166]
4030 [153]"SPC(SPC(SPC(SPC(SPC(SPC(
4040 PRINT"[166][166][166][166][166][166]
4050 [153]"SPC(SPC(SPC(SPC(SPC(SPC(
4060 PRINT"[166][166][166][166][166][166]
4070 [153]"SPC(SPC(SPC(SPC(SPC(SPC(TOTOTOTOTOTOTO
4080 PRINT"[166][166][166][166][166][166]
4090 [153]"SPC(SPC(SPC(SPC(SPC(SPC(
4100 PRINT"[166][166][166][166][166][166]
4110 [153]"SPC(SPC(SPC(SPC(SPC(SPC(
4120 PRINT"[166][166][166][166][166][166]
4130 [153]"SPC(SPC(SPC(SPC(SPC(SPC(TOTOTOTOTOTOTO
4140 PRINT"[162][162][162][162][162][162][146]";
4200 PRINT""
4210 PRINTTAB(16+I)"[145]/[163][163][163][157][157][157][157][140][157]";
4215 PRINT"[163][146][157]";
4220 FORX3=1TO11
4230 PRINT"[204][157]";
4242 NEXTX3
4250 PRINT"[163][146][157]\[164][164][164]
4395 B[178]I
4400 [139]B[178]0[167]4700
4500 [129]B[178]0[164](I[171]1)
4550 [151](32864[170]B),99:[151](33104[170]B),100:[151](33344[170]B),100
4580 [151](33144[170]B),PM
4680 [130]B
4685 [129]B[178]0[164]([181](I[173]2))
4687 [151](33184[170](2[172]B)),PM
4688 [130]B
4689 [151]33224,48:[139]I[177]10[167][151]33234,53
4700 [142]
4750 [151](33145[170]I),100:[151](33184),48
5000 [153]" PRESS ANY KEY TO CONTINUE
5010 GETA$: IFA$=""THEN5010
5020 RETURN
5200 PRINT"[147]TO TEST YOUR SKILL
5210 [153]"STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$STR$
5220 PRINT"READ THE MICROMETER, AND THEN
5230 [153]"TYPE IN THE READING AND UNIT, AND
5240 PRINT"THEN PRESS RETURN[146] TO SEE IF YOU ARE
5250 [153]"RIGHT.
5255 GOSUB5000
5260 GOSUB3700:N=0:N$="FIRST"
5270 PRINT"YOUR ";N$;" GUESS IS ";:INPUTG$
5275 IFRIGHT$(G$,2)="MM"GOTO5281
5280 PRINT"YOU MUST ALWAYS PUT IN THE UNIT [146]":GOTO5270
5281 GD=INT(VAL(G$)*100):GF=INT(Z*100)
5282 IFGD=GFTHEN5380